//菜单信息数据
export const state = () => ({
  menu: [],
  hotSearch: []
});

//更改state
export const mutations = {
  setMenu(state, val) {
    state.menu = val;
  },
  setHotSearch(state, val) {
    state.hotSearch = val;
  }
}

//action专门用于commit
export const actions = {
  setMenu({
    commit
  }, menu) {
    commit('setMenu', menu);
  },
  setHotSearch({
    commit
  }, hotSearch) {
    commit('setHotSearch', hotSearch);
  }
}
